<div class="tab-box">
    <ul>
        <li ng-class="{active:search.state==1}"  ui-sref="application.contract({state:1})" ui-sref-opts="{reload:true}">待签合同</li>
        <li ng-class="{active:search.state==2}" ui-sref="application.contract({state:2})" ui-sref-opts="{reload:true}">历史合同</li>
        <li ng-class="{active:search.state==3}" ui-sref="application.contract({state:3})" ui-sref-opts="{reload:true}">合同编号</li>
    </ul>
</div>

<ul style="padding: 20px;">
    <li>
        贷款方式：{{data.loanType}}
    </li>
    <li style="padding-top: 20px;">
        <span>合同编号：</span>
        <input ng-disabled="haveCont" type="text" class="form-control" ng-model="data.order.contract_no" style="display: inline-block;width: 200px;">
        <button ng-disabled="haveCont" class="btn btn-radius btn-sct" ng-click="creatNum()" >生成合同编号</button>
    </li>
</ul>
<div class="public-bgContent">
        <ul class="public-PoBefore-nav">
            <li>
                <span>
                  <a 
                  href="javascript:void(0)"
                  class="active">
                    还款计划
                  </a>
                </span>
            </li>
        </ul>
        <div class="public-content ">

            <table colspan="8">
                <tbody>
                    <tr>
                        <td>借款人：</td>
                        <td colspan=6>{{data.order.main_name}}&nbsp;&nbsp;&nbsp;{{data.order.id_card}}</td>
                    </tr>
                    <tr>
                        <td>贷款人：</td>
                        <td colspan=6 class="more-inp">
                            <input class="form-control" ng-focus="remlight()" ng-class="{'error':errTip.borr}" type="text" ng-model="data.order.first_party" placeholder="请输入真实姓名" maxlength="7" />
                            <input class="form-control" ng-focus="remlight()" ng-class="{'error':errTip.borr}" type="text" ng-model="data.order.first_party_idcard" placeholder="请输入身份证号码" />
                            <input
                                class="form-control"
                                ng-focus="remlight()"
                                ng-class="{'error':errTip.borrTis[$index].id_card}"
                                type="text" ng-model="data.order.first_party_address"
                                placeholder="输入联系地址"
                                />

                        </td>
                    </tr>
                    <tr ng-if="contract_nobefore">
                        <td>关联合同编号 ：</td>
                        <td colspan=6>
                            <span class="pact-back"> {{contract_nobefore}}</span> 的贷款合同
                        </td>
                    </tr>
                    <tr>
                        <td>放款日期</td>
                        <td class="width-all"><ui-datepicker error-tis=""  ng-model="data.order.loan_time"></ui-datepicker></td>
                        <td>贷款金额</td>
                        <td class="keyInfo">{{data.order.apply_money | currency:'￥'}}
                          <div class="public-content-chinese">({{data.order.apply_money | chinese}})</div></td>
                        <td>放款金额</td>
                        <td class="keyInfo">{{data.order.loan_amount | currency:'￥'}}
                          <div class="public-content-chinese">({{data.order.loan_amount | chinese}})</div></td>
                    </tr>
                </tbody>
            </table>
            <!-- 分期展示 -->

            <table colspan="8" class="table-periods" ng-if="dataList.length>0">
                <thead>
                  <tr>
                    <td>期数</td>
                    <td>还款日期</td>
                    <td>月还款本金</td>
                    <td>月还款利息</td>
                    <td>合计</td>
                  </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="i in dataList">
                        <td>{{i.periods}}</td>
                        <td>{{i.repayment_time}}</td>
                        <td>{{i.month_repayment_money}}</td>
                        <td>{{i.moth_repayment_rate}}</td>
                        <td>{{i.month_repayment_money+i.moth_repayment_rate}}</td>
                    </tr>
                </tbody>
            </table>
        </div>

        <!--底部提交评估按钮-->
        <div class="public-bgBotBtn">
            <div>
                <button class="btn btn-radius" ng-click="back()">返回列表</button>
                <!-- <button class="btn btn-radius" ui-sref="application.subsaveok(searchData)">保存信息不提交</button> -->
                <button class="btn btn-radius btn-sct" ng-click="sel()">提交保存</button>
            </div>
        </div>
    </div>